﻿@model GameSchoolWeb.Models.ExamIndexModelView
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Exam</legend>
        @Html.HiddenFor(model => model.Exam.id)
        <div class="editor-label">
            @Html.LabelFor(model => model.Exam.strTitle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Exam.strTitle)
            @Html.ValidationMessageFor(model => model.Exam.strTitle)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Exam.dDateAdded)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Exam.dDateAdded)
            @Html.ValidationMessageFor(model => model.Exam.dDateAdded)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Exam.nPoints)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Exam.nPoints)
            @Html.ValidationMessageFor(model => model.Exam.nPoints)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Exam.levelId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Exam.levelId)
            @Html.ValidationMessageFor(model => model.Exam.levelId)
        </div>
        @foreach (var item in Model.Question)
        {
	 
            <div class="editor-label">
                <strong>Spurning</strong></div>
            <div class="editor-field">
                @Html.EditorFor(model => item.strTitle)
                @Html.ValidationMessageFor(model => item.strTitle)
            </div>

            <div class="editor-label">
                <strong>Valmöguleiki 1</strong></div>
            <div>
                @Html.EditorFor(model => item.striOptionOne)
                @Html.ValidationMessageFor(model => item.striOptionOne)
            </div>
	 
            <div class="editor-label">
                <strong>Valmöguleiki 2</strong></div>
            <div>
                @Html.EditorFor(model => item.strOptionTwo)
                @Html.ValidationMessageFor(model => item.strOptionTwo)
            </div>
	 
            <div class="editor-label">
                <strong>Valmöguleiki 23</strong></div>
            <div>
                @Html.EditorFor(model => item.strOptionThree)
                @Html.ValidationMessageFor(model => item.strOptionThree)
            </div>
	 
            <div class="editor-label">
                <strong>Valmöguleiki 4</strong></div>
            <div>
                @Html.EditorFor(model => item.strOptionFour)
                @Html.ValidationMessageFor(model => item.strOptionFour)
            </div>
	 
            <div class="editor-label">
                <strong>Valmöguleiki 5</strong></div>
            <div>
                @Html.EditorFor(model => item.strOptionFive)
                @Html.ValidationMessageFor(model => item.strOptionFive)
            </div>
	 
            <div class="editor-label">
                <strong>Rétt svar</strong></div>
            <div>
                @Html.EditorFor(model => item.nCorrectOption)
                @Html.ValidationMessageFor(model => item.nCorrectOption)
            </div>
        }
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
